package com.cxs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cxs.pojo.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Project: cxs-batch-update-demo
 * @Author: cxs2014501@163.com
 * @Create: 2022/10/17 14:36
 * @Description:
 **/
@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    // 单个修改、baseMapper已经有了，我重新写了一遍
    int updateStudentById(Student student);
    // 批量添加
    int insertBatch(@Param("list") List<Student> studentList);
    // 批量修改
    int updateByIdBatch(@Param("list") List<Student> studentList);
}
